package com.chat.login.service.impl;

import com.chat.common.pojo.EmailRequest;
import com.chat.login.service.MailService;
import com.chat.login.utils.EmailUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MaliServiceImpl implements MailService {

    @Autowired
    private EmailUtils emailUtils;

    @Override
    public void sendEmail(EmailRequest emailRequest) {
        emailUtils.sendEmail(emailRequest.getToEmail(), emailRequest.getSubject(), emailRequest.getBody());
    }
}
